home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Development Kits / MPW etc / MPW-PR / Interfaces&Libraries / Interfaces / CIncludes / MacRuntime.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-10-12  |  1.7 KB  |  76 lines  |  [TEXT/MPS ]

  1. /*
  2.  *    MacRuntime.h
  3.  *    C Interface to the Macintosh Programmer's Workshop Libraries
  4.  *
  5.  * © Copyright Apple Computer Inc. 1993-1995
  6.  * All rights reserved.
  7.  *
  8.  * Warning:  This interface is NOT a part of the ANSI C standard.
  9.  *             We do NOT claim to be POSIX compliant.  If you want
  10.  *             your code to be portable, don't use this interface.
  11.  */
  12.  
  13.  
  14. #ifndef __MACRUNTIME__
  15. #define __MACRUNTIME__    1
  16.  
  17.  
  18. #ifndef __MACTYPES__
  19. #include <MacTypes.h>
  20. #endif
  21.  
  22. #if defined(__CFM68K__) || defined(__powerc)
  23. #include <CodeFragments.h>        /* For "CFragInitBlockPtr". */
  24. #endif /* __CFM68K__ || __powerc */
  25.  
  26. #if defined(__powerc)
  27. #include <Memory.h>                /* For "THz". */
  28. #endif /* __powerc */
  29.  
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33.  
  34. /* Program Initialization and Termination */
  35.  
  36. int _RTInit(ProcPtr retPC, int *pArgC, char ***pArgV, char ***pEnvP, int forPascal);
  37. void _RTExit(int status);
  38.  
  39. /* Utility Routine */
  40.  
  41. pascal Boolean TrapAvailable (short TrapNumber);
  42.  
  43. #if defined(__CFM68K__) || defined(__powerc)
  44.  
  45. /* Default code fragment initialization and termination entry points.        */
  46. /* Needed for CFM applications or shared libraries containing C++ code.        */
  47.  
  48. extern OSErr    __init_app(CFragInitBlockPtr initBlockPtr);
  49. extern void        __term_app(void);
  50. extern OSErr    __init_lib(CFragInitBlockPtr initBlockPtr);
  51. extern void        __term_lib(void);
  52.  
  53. #endif /* __CFM68K__ || __powerc */
  54.  
  55. #if defined(__powerc)
  56. /* Types and functions for use in PowerMac CFM termination routines. */
  57.  
  58. struct CFragWorld {
  59.     THz heapZone;
  60.     long emulatorA5;
  61.     int unused;
  62. };
  63.  
  64. typedef struct CFragWorld CFragWorld, *CFragWorldPtr;
  65.  
  66. extern void __RestoreInitialCFragWorld(CFragWorldPtr oldCFragWorld);
  67. extern void __RevertCFragWorld(CFragWorldPtr oldCFragWorld);
  68.  
  69. #endif /* __powerc */
  70.  
  71. #ifdef __cplusplus
  72. }
  73. #endif
  74. #endif
  75.  
  76.